monobean: add mock unitest & set default ligtht theme#1241
Merged
yyk808 merged 17 commits intoJul 18, 2025
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Signed-off-by: pleasedontbreak123 <nabeiyq@126.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds mock testing capabilities and fixes the theme selector functionality. The main purpose is to enable proper unit testing with mock context and fix the action group mapping for the theme selector button.
- Implements mock testing infrastructure for unit tests
- Fixes theme selector button action group mapping from "win.style-variant" to "style.style-variant"
- Changes default theme from 'system' to 'light'
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| vault/src/integration/vault_core.rs | Makes config method public and adds excessive whitespace |
| monobean/src/window.rs | Implements proper action group for theme selector functionality |
| monobean/src/core/mega_core.rs | Adds mock context support and enables previously commented-out tests |
| monobean/resources/org.Web3Infrastructure.Monobean.gschema.xml | Changes default theme from 'system' to 'light' |
| monobean/resources/gtk/theme_selector.ui | Updates action names from "win.style-variant" to "style.style-variant" |
| monobean/Cargo.toml | Adds toml dependency for configuration handling |
| context/src/lib.rs | Implements mock method for testing and adds test storage import |
Comments suppressed due to low confidence (7)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Neon <71858127+yyk808@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Neon <71858127+yyk808@users.noreply.github.com>
yyk808
reviewed
Jul 18, 2025
yyk808
approved these changes
Jul 18, 2025
liuyangjuncong20202570
pushed a commit
to liuyangjuncong20202570/mega
that referenced
this pull request
Jul 20, 2025
* adapt new conntext api * monobean:adapt new context api * passed unit tests * fix clippy erro * fix clippy erro * Add mock implementations for testing * add mock test & fix theme selector button * test * add mock test & fix theme selector button * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Neon <71858127+yyk808@users.noreply.github.com> * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Neon <71858127+yyk808@users.noreply.github.com> * Delete monobean/resources/gschemas.compiled --------- Signed-off-by: pleasedontbreak123 <nabeiyq@126.com> Signed-off-by: Neon <71858127+yyk808@users.noreply.github.com> Co-authored-by: Quanyi Ma <eli@patch.sh> Co-authored-by: Neon <71858127+yyk808@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
add mock test
fix theme selector button